#include <iostream>

using namespace std;

int main()
{
    int a = 5;
    int b = 10;
    auto lfun = [&,a](int c, auto d) -> decltype(a+b+c+d) {
        //a = 1;                // a的值为只读，不能修改
        b = 2;
        return a+b+c+d;
    };

    cout << lfun(15,3.5)<<endl;
    cout << "a:"<<a<<endl;
    cout << "b:"<<b<<endl;
}